#ifndef __TYPE_H_
#define __TYPE_H_


typedef unsigned char    BOOL;
typedef signed char      int8;
typedef unsigned char    uint8;
typedef unsigned char    uchar;
typedef signed short     int16;
typedef unsigned short   uint16;
typedef signed long      int32;
typedef unsigned long    uint32;
typedef unsigned int     UINT32_t;

#ifndef SUCCEED
#define SUCCEED (1)
#endif

#ifndef FAIL
#define FAIL    (0)
#endif

#ifndef OK
#define OK      (1)
#endif

#ifndef ERR
#define ERR     (0)
#endif

#ifndef TRUE
#define TRUE    (1)
#endif

#ifndef FALSE
#define FALSE   (0)
#endif

#ifndef NULL
#define NULL    ((void *)0)
#endif

#ifndef ENABLE
#define ENABLE   1
#endif

#ifndef DISABLE
#define DISABLE  !ENABLE
#endif


#define BYTE2(a)            ((uint8)(((a)&0xff0000)>>16))
#define BYTE1(a)            ((uint8)(((a)&0x00ff00)>>8))
#define BYTE0(a)            ((uint8)((a)&0x0000ff))
#define WORD24(a,b,c)       (((a)<<16)+((b)<<8)+(c))

#endif

